package com.fearless.test20210429.unsafe;

import java.util.concurrent.Callable;
import java.util.concurrent.Future;
import java.util.concurrent.FutureTask;

public class MapTest {

    public static void main(String[] args) {


        new Thread(new FutureTask<>(new MyThread())
                ,"可以").start();



        new Thread(new FutureTask<>(new Callable<String>() {
            public String call() throws Exception {

                return "123";
            }
        }),"线程A").start();




    }




}
class MyThread implements Callable<String>{

    public String call() throws Exception {

        return "123";
    }


}